﻿-- Dates...
select dbo.FormatString0('Hello World at {0:dd MMM yyyy}', getdate()); 

-- Custom Formats...
select dbo.FormatString0('{0:0.00%;(0.00)%}',-0.1567);

-- Table-driven...
select Fotia.dbo.FormatString0('{0}', object_id) from sys.objects;
select Fotia.dbo.FormatString1('{0} -> {1}', object_id, name) from sys.objects;
select Fotia.dbo.FormatString2('{0} -> {1} ({2})', object_id, name, type_desc) from sys.objects;
select Fotia.dbo.FormatString3('{0} -> {1} ({2}) / {3:dd MMM yyyy}', object_id, name, type_desc, modify_date) from sys.objects;